<?php

namespace App\Http\Requests\Api;

class FirstChatSmsRequest extends ApiRequest
{
    public function rules()
    {
        $is_com = $this->input('type', 0) == 1;

        if ($is_com) {//向企业发送短信
            return [
                'resume_id' => 'required',
                'job_id' => 'required',
                'com_id' => 'required',
            ];
        }

        return [//向个人发送短信
            'com_id' => 'required',
            'resume_id' => 'required',
        ];
    }
}
